In superscalar processors configured to implement pipelining, accuracy of branch prediction can have significant impact on overall system performance. Cost of misspeculation (i.e., misprediction) increases with wider and deeper pipelines.
Generally, branch predictors rely on past behavior of a branch instruction to make a prediction of whether a branch is taken or not taken. For example, branch predictors may be configured to utilize global branch history to make the prediction. The outcome of a branch, taken or not taken, is typically determined based, at least in part, on a comparison. The outcome of the comparison and thus the branch outcome may be dependent on a result of a prior computation and/or a data value stored in memory. The result and/or data value may be obtained using a load instruction.
While predictors that rely on past behavior may capture correlation among outcomes of prior branches, some types of branches are difficult to predict using these predictors. For example, branches where a branch outcome is directly dependent on a relatively high entropy data value may be difficult to predict based on branch history since high entropy is associated with high variance.
Although the following Detailed Description will proceed with reference being made to illustrative embodiments, many alternatives, modifications, and variations thereof will be apparent to those skilled in the art.